package com.os.meituan.service.sec;

import org.springframework.stereotype.Component;
import org.springframework.data.redis.core.RedisTemplate;

import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;

@Component
public class RedisCacheService {
    @Resource
   RedisTemplate redisTemplate;



    public void set(String key, Object value, long minutes) {
        redisTemplate.opsForValue().set(key, value, minutes, TimeUnit.MINUTES);
    }

}
